Native Format
Add a field to a native format.
POST
/
api
/
manager
/
native-formats
/
{fid}
/
fields
Add a field to a native format.
curl --request POST \
--url https://your_a2_service/api/manager/native-formats/{fid}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_binding": {
"asset_type": 123
},
"label": "<string>",
"name": "<string>",
"constraints": {
"input_type": "text",
"max_length": 123
},
"description": "<string>",
"input_type": "text",
"is_required": false
}
'import requests
url = "https://your_a2_service/api/manager/native-formats/{fid}/fields"
payload = {
"asset_binding": { "asset_type": 123 },
"label": "<string>",
"name": "<string>",
"constraints": {
"input_type": "text",
"max_length": 123
},
"description": "<string>",
"input_type": "text",
"is_required": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_binding: {asset_type: 123},
label: '<string>',
name: '<string>',
constraints: {input_type: 'text', max_length: 123},
description: '<string>',
input_type: 'text',
is_required: false
})
};
fetch('https://your_a2_service/api/manager/native-formats/{fid}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/native-formats/{fid}/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset_binding' => [
'asset_type' => 123
],
'label' => '<string>',
'name' => '<string>',
'constraints' => [
'input_type' => 'text',
'max_length' => 123
],
'description' => '<string>',
'input_type' => 'text',
'is_required' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/native-formats/{fid}/fields"
payload := strings.NewReader("{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/api/manager/native-formats/{fid}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/native-formats/{fid}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"fields": [],
"format_type": "user_defined",
"no": 123,
"owner_name": "<string>",
"status": "inactive"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication. Pass the access token in the Authorization: Bearer <token> header.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Minimum string length:
1Pattern:
^[a-z_]+$- TextConstraints
- ImageConstraints
- VideoConstraints
- UrlConstraints
- NumberConstraints
Show child attributes
Show child attributes
Available options:
text, image, video, url, number Response
Successful Response
Unique identifier (UUID v7).
Human-readable name of the format.
ID of the operator who owns this format.
Optional description of the format.
Show child attributes
Show child attributes
Whether this format is system-defined or user-defined.
Available options:
system_defined, user_defined Name of the format owner
Operational status of the format.
Available options:
active, inactive Was this page helpful?
⌘I
Add a field to a native format.
curl --request POST \
--url https://your_a2_service/api/manager/native-formats/{fid}/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset_binding": {
"asset_type": 123
},
"label": "<string>",
"name": "<string>",
"constraints": {
"input_type": "text",
"max_length": 123
},
"description": "<string>",
"input_type": "text",
"is_required": false
}
'import requests
url = "https://your_a2_service/api/manager/native-formats/{fid}/fields"
payload = {
"asset_binding": { "asset_type": 123 },
"label": "<string>",
"name": "<string>",
"constraints": {
"input_type": "text",
"max_length": 123
},
"description": "<string>",
"input_type": "text",
"is_required": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset_binding: {asset_type: 123},
label: '<string>',
name: '<string>',
constraints: {input_type: 'text', max_length: 123},
description: '<string>',
input_type: 'text',
is_required: false
})
};
fetch('https://your_a2_service/api/manager/native-formats/{fid}/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/api/manager/native-formats/{fid}/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asset_binding' => [
'asset_type' => 123
],
'label' => '<string>',
'name' => '<string>',
'constraints' => [
'input_type' => 'text',
'max_length' => 123
],
'description' => '<string>',
'input_type' => 'text',
'is_required' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/api/manager/native-formats/{fid}/fields"
payload := strings.NewReader("{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/api/manager/native-formats/{fid}/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/native-formats/{fid}/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asset_binding\": {\n \"asset_type\": 123\n },\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"constraints\": {\n \"input_type\": \"text\",\n \"max_length\": 123\n },\n \"description\": \"<string>\",\n \"input_type\": \"text\",\n \"is_required\": false\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"fields": [],
"format_type": "user_defined",
"no": 123,
"owner_name": "<string>",
"status": "inactive"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}